In the field of data communication, as regards to a switched network element chip in a packet switched network, efficiency and scale of a data cache space and a width of a data bus are critical to performance, area and power consumption of the chip. In order to save bus resources and cache resources within the chip and improve switching efficiency, a data packet may generally be divided into a certain number of cells. Then the cells may be transferred to the switched network element chip to be switched and replicated, and the cells may be recombined into the data packet. The cells, subjected to auto addressing and query and input/output buffering, may enter into an output port via an input port to achieve forwarding and replication functions. FIG. 1 is a schematic diagram of a large-scale switched network data process. As a minimum unit for transferring and switching, a cell may be of a fixed-length type or a variable-length type. Compared to the fixed-length cell, the variable-length cell may have a higher utilization of the cache resources and bus resources. Thus, it is the variable-length cell that is generally employed.
A cell cache in the switched network element chip is mainly used to store cell data during a process of the cell waiting for a result of the auto addressing and a process of scheduling outputting. When there is no traffic pressure within the network, a small cache space may be needed. When congestion occurs within the network, serial data packets on an optical fibre with a length up to 100 meters, may have to be cached. The cache space is calculated based on a switching capacity of the switched network element chip so as to avoid that large-scale packet loss occurs in case of the congestion within the network. Currently, in order to cache the cell, a storage space with redundancy may be calculated based on the number of links, the length of the optical fibre, and the data transmission rate. However, with improvement of the scale of the switched network and the data rate, the cache space resources should be increased correspondingly. For example, when the data rate is increased from 12.5 G to 25 G, the capacity of the cache resources should be doubled to guarantee that there is no forwarding loss. Furthermore, in the case of the variable-length cell switching, the utilization of the cache resources may be relatively low. Specially, the utilization of the cache resources is less than 50% in case of smallest cell storage. FIG. 2 is a schematic diagram of utilization for network element storage spaces of various lengths.
In view of the above, it is urgent to provide a data caching method and device, applied in the packet switched network, to improve the utilization of the cache resources and the bus resources.